<?php
header("Content-Type: text/html; charset=utf-8");
/**
 * @Author:      zwh
 * @DateTime:    2016-4-19 15:49:16
 * @Description: 车辆信息修改记录
 */

class ModifyCarsRecords extends Eloquent
{

    protected $table = "modify_cars_records";



   	/**
   	 * @Author:      zwh
   	 * @DateTime:    2016-4-19 15:50:14
   	 * @Description: 用于记录 车辆信息的操作记录的方法
   	 *
   	 */
    public static function saveRecords($sys_user,$user_car_id){
        $uci=UserCarInfo::find($user_car_id);
    	$mcr=new ModifyCarsRecords();
    	$mcr->user_id=$uci->user_id;
    	$mcr->user_car_id=$uci->id;
        $mcr->car_brand_id=$uci->car_brand_id;
    	$mcr->car_series_id=$uci->car_series_id;
    	$mcr->car_model_id=$uci->car_model_id;
    	$mcr->car_no=strtoupper($uci->car_no);
    	$mcr->vin_code=$uci->vin_code;
    	$mcr->mileage=$uci->mileage;
    	$mcr->note=$uci->note;
    	$mcr->insurance=$uci->insurance;
    	$mcr->create_by=$sys_user->id;
    	$mcr->create_type='service';
    	$mcr->save();
    }

}
